﻿using System;
using System.Text;

namespace StringBuilderExample
{
    class Program
    {
        static void Main(string[] args)
        {

            var s = "Hello" + " " + "World";

            var sb = new StringBuilder();
            /*
            sb.Append("Hello");
            sb.Append(" ");
            sb.Append("World");
            sb.Append(Environment.NewLine);
            */

            for (int i = 0; i < 10000; i++)
            {
                //sb.AppendLine(string.Format("{0}^2 = {1}", i, i * i));
                sb.AppendFormat("{0}^2 = {1}", i, i * i);
            }

            var text = sb.ToString();
            //Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
        }
    }
}
